function x = Linverse(A,n)
%UNTITLED 此处显示有关此函数的摘要
%   此处显示详细说明
I = zeros(n);
for i = 1:n
    I(i,i) = 1;
end
for i = 1:n-1
        for j = 1:n
            I(i,j) = I(i,j)/A(i,i);
        end
        for k = i+1:n
            I(k,i) = I(k,i) - I(i,i)*A(k,i);
        end
    for j = 1:n
        I(n,j) = I(n,j)/A(n,n);
    end
x = I;
end

